Skip to content

Fix getDiff: verify worktree health with absolute paths#142

Merged
that-github-user merged 1 commit into
mainfrom
fix-136-getDiff-health-check
Mar 29, 2026
Merged

Fix getDiff: verify worktree health with absolute paths#142
that-github-user merged 1 commit into
mainfrom
fix-136-getDiff-health-check

Conversation

@that-github-user

Copy link
Copy Markdown
Owner

Summary

  • Resolve worktree path to absolute before all git operations
  • Verify .git file exists + git rev-parse before git add
  • Clear warning when worktree is corrupted
  • Fixes blocking dogfooding bug where complex agent runs show 0 files changed

Change type

  • Bug fix

Related issue

Closes #136

How to test

npm test  # 237 tests pass

Breaking changes

  • This PR introduces breaking changes

🤖 Generated with Claude Code

Resolve worktree path to absolute, verify .git file exists and git
rev-parse works before running git add. Prevents cryptic 'not a git
repository' errors when agents cd out of worktree during execution.

Closes #136

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@that-github-user that-github-user merged commit 72bf6fa into main Mar 29, 2026
4 checks passed
@that-github-user that-github-user deleted the fix-136-getDiff-health-check branch March 29, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: getDiff fails with 'not a git repository' when agents cd out of worktree

1 participant